Page({
  data: {
    repairList: [],
    isFirst: true,
  },
  // 跳转报修详情页
  goDetail(e) {
    wx.navigateTo({
      url: '/repair_pkg/pages/detail/index?id=' + e.mark.id,
    })
  },
  addRepair() {
    wx.navigateTo({
      url: '/repair_pkg/pages/form/index',
    })
  },
  onLoad() {
    this.getRepairList()
  },
  async getRepairList() {
    const { data } = await wx.http.get('/repair', {
      current: 1,
      pageSize: 10,
    })
    this.setData({
      repairList: data.rows,
      isFirst: false,
    })
  },
})
